#include "VServer.h"

VServer::VServer() : QMainWindow()
{
    this->setFixedSize(600, 600);
    QIcon icon = QIcon("icon_cas.ico");
    this->setWindowIcon(icon);

    central_widget = new QMdiArea;
    central_widget->setViewMode(QMdiArea::TabbedView);

    v_chat = new VChat;
    sub_chat = central_widget->addSubWindow(v_chat);

    v_data_base = new VDataBase;
    sub_data_base = central_widget->addSubWindow(v_data_base);

    v_user = new VUser;
    sub_user = central_widget->addSubWindow(v_user);

    this->setCentralWidget(central_widget);
}

VServer::~VServer()
{
    delete v_chat;
    delete v_data_base;
    delete v_user;

    delete central_widget;
}
